package cn.wolfcode.p2p.base.util;

import lombok.Getter;
import lombok.Setter;

/**
 * Created by wolfcode on 2018/7/20.
 */
@Setter@Getter
public class JSONResult {
    private boolean success = true;
    private String msg;
    public JSONResult(){}//new JSONResult()====>{success:true,msg:""}
    public JSONResult(String msg){//new JSONResult("保存成功")====>{success:true,msg:"保存成功"}
        this.msg = msg;
    }
    public JSONResult(boolean success,String msg){//new JSONResult(false,"保存失败")===>{success:false,msg:"保存失败"}
        this.success = success;
        this.msg = msg;
    }
}
